package com.ljh.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ljh.pojo.Admin;
import com.ljh.pojo.Role;
import com.ljh.utils.RespBean;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lijiahao
 * @since 2021-09-01
 */
public interface IAdminService extends IService<Admin> {
    RespBean login(String username, String password, String code, HttpServletRequest request);

    Admin getAdminByName(String name);
    /**
     * 根据用户ID获取权限列表
     */
    List<Role> getRoleByAdminId(Integer adminId);

    /**
     * 查询操作员
     * @param keyword
     * @return
     */
    List<Admin> getAllAdmin(String keyword);

    RespBean updatePassWord(String oldPass, String pass, Integer adminId);

    RespBean updateUserFace(String url, Integer id, Authentication authentication);

    RespBean updateAdminRole(Integer id, Integer[] ids);
}
